package com.demo;

import org.apache.log4j.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;

/**
 * Created by hui on 2017/12/4.
 */

@SpringBootApplication
@MapperScan("com.demo.mapper")
public class DemoApplication extends SpringBootServletInitializer {
    private static Logger logger = Logger.getLogger(DemoApplication.class);

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(DemoApplication.class);
    }

    /**
     * Main Start
     */
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
        logger.info("============= SpringBoot Start Success =============");
    }
}
